<?php 
 require_once('nav.php');
require_once('inc_admin.php');
connect();
$search=$_GET['search'];

$sql="select * from videos where vid like '%{$search}%' ";
$re=mysql_query($sql) or die('查询失败！'.mysql_error());

 ?>
   <br>
   <br>
     <br>
   <br>
   <center><h>视频信息列表</h></center>
   </br>
   </br>
   </br>
   </br>
   <table class="table table-hover">
   <thead>
      <tr>
   <th>用户编号</th>
   <th>视频名称</th>   
   <th>视频类型</th>
   <th>海报</th>
   <th>内容简介</th>
   <th>添加日期</th>
   <th>上传用户</th> 
   <th>点击率</th> 
   <th>下载量</th> 
   <th>下载地址</th> 
   <th>操作</th> 
 </tr>
   </thead>

   <tbody>
   <?php
    while($row=mysql_fetch_assoc($re) ){
     echo '<tr>';
   echo '<td>'.$one['vid'].'</td>';
   echo '<td>'.$one['videoname'].'</td>';  
   echo '<td>'.$one['tid'].'</td>';
   echo '<td>'.$one['pic'].'</td>';
   echo '<td>'.$one['intro'].'</td>'; 
   echo '<td>'.$one['uploaddate'].'</td>';
   echo '<td>'.$one['uploadadmin'].'</td>';
   echo '<td>'.$one['hittimes'].'</td>';
   echo '<td>'.$one['downtimes'].'</td>';
   echo '<td>'.$one['address'].'</td>';
   echo '<td>
   <a href="videoForm.html">添加</a> |'.
   '<a href="videoEditForm.php?id='.$one['vid'].' ">修改</a> | 
   <a href="videoDelete.php?id='.$one['vid'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
   echo '</tr>';  
    }
    echo '</tbody>';
    echo '</table>';  
    $totalrows = count($row);
    echo "<table align='center'><tr><td>共有{$totalrows}条记录</td></tr></table>"   ;
   ?>